package jhub;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.text.ParseException;
import java.util.Enumeration;
import jhub.conn.exception.LoginErrorException;

import jhub.text.ActiveSearchMessage;
import jhub.text.Command;
import jhub.text.ConnectToMeMessage;
import jhub.text.DCRawCommand;
import jhub.text.GetInfoMessage;
import jhub.text.HelloMessage;
import jhub.text.HubNameMessage;
import jhub.text.MyINFOMessage;
import jhub.text.MyPassMessage;
import jhub.text.PrivateChatMessage;
import jhub.text.PublicChatMessage;
import jhub.text.QuitMessage;
import jhub.text.ValidateNickMessage;
import jhub.text.VersionMessage;

public class DCProtocol {
	
	public static final String HUB_NAME_ID = "$HubName ";
	public static final String HUB_NAME_FORMAT = "$HubName {0}|";
	
	public static final String ACTIVE_SEARCH_ID = "$Search ";
	public static final String ACTIVE_SEARCH_FORMAT = "$Search {0} {1}|";
        
	public static final String PASSIVE_SEARCH_ID = "$Search Hub:";
	public static final String PASSIVE_SEARCH_FORMAT = "$Search Hub:{0} {1}|";
        
        // $SR <replynick> <searchresponse><searchnick>
	public static final String PASSIVE_SEARCH_RESULT_ID = "$SR ";
	public static final String PASSIVE_SEARCH_RESULT_FORMAT = "$SR {0} {1}"+((char)5)+"{2}|";
	public static final String PASSIVE_SEARCH_RESULT_REPLY_FORMAT = "$SR {0} {1}|";
        
	public static final String PRIVATE_CHAT_ID = "$To: ";
	public static final String PRIVATE_CHAT_FORMAT = "$To: {0} From: {1} $<{1}> {2}";
	
	public static final String CONNECTTOME_ID = "$ConnectToMe ";
	public static final String CONNECTTOME_FORMAT = "$ConnectToMe {0} {1}:{2}"; 
	
	public static final String VERSION_ID = "$Version ";
	public static final String VERSION_FORMAT = "$Version {0}|";
	
	public static final String GETINFO_ID = "$GetINFO ";
	public static final String GETINFO_FORMAT = "$GetINFO {0} {1}|";
	
	public static final String GETNICKLIST_ID = "$GetNickList|";
	
	public static final String HELLO_ID = "$Hello ";
	public static final String HELLO_FORMAT = "$Hello {0}|";
	
	public static final String VALIDATE_NICK_ID = "$ValidateNick ";
	public static final String VALIDATE_NICK_FORMAT = "$ValidateNick {0}|";
	
	public static final String QUIT_ID = "$Quit ";
	public static final String QUIT_FORMAT = "$Quit {0}|";
	
	public static final String MYINFO_ID = "$MyINFO ";
	public static final String MYINFO_FORMAT = "$MyINFO $ALL {0} {1}$ ${2}${3}${4}$|";
	
	public static final String KEY_ID = "$Key ";
	public static final String KEY_FORMAT = "$Key {0}|";
	
	public static final String PUBLIC_CHAT_ID = "<";
	public static final String PUBLIC_CHAT_FORMAT = "<{0}> {1}|";
        
        public static final String GET_PASS_FORMAT = "$GetPass|";
        
        public static final String MYPASS_ID = "$MyPass ";
	public static final String MYPASS_FORMAT = "$MyPass {0}|";
        
        public static final String SUPPORTS_ID = "$Supports ";
	public static final String SUPPORTS_FORMAT = "$Supports {0}|";
	
        public static final String VALIDATEDENIDE_FORMAT ="$ValidateDenide|";
        
        public static final String BADPASS_FORMAT ="$BadPass|";

        public static final String KICK_ID = "$Kick ";
	public static final String KICK_FORMAT = "$Kick {0}|";
        
        public static final String FORCEMOVE_ID = "$OpForceMove ";
	public static final String FORCEMOVE_FORMAT = "$OpForceMove $Who:{0}$Where:{1}$Msg:{2}|";
	
}
